# import jwt
# import datetime
# playload={
#     'exp':int((datetime.datetime.now()+datetime.timedelta(seconds=60)).timestamp()),
#     'uid':'2'
# }
# encode_jwt= jwt.encode(playload,'201528',algorithm='HS256')
# encode_str=str(encode_jwt,encoding='utf-8')
# print(encode_str)
#
# decode_jwt=jwt.decode(encode_str,key='201528',algorithms=['HS256'])
# print(decode_jwt)

# from django.utils.deprecation import MiddlewareMixin
#
# class My_middleware(MiddlewareMixin):
#     def process_request(self,request):
#         pass
#     def process_view(self,request,view_func,view_args,viwe_kwargs):
#
#         pass
#     def process_exception(self,request,exception):
#         pass
#     def process_response(self,request,response):
#         return response

from django.utils.decorators import method_decorator
# def my_decorator(func):
#     def process(request,*args,**kwargs):
#
#
#         return func(request,*args,**kwargs)
#     return process
# import redis
# r = redis.Redis('localhost', 6379)
# r.hmset('test',{'color':'red',"size":'xxx'})
